<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018-07-19
 * Time: 下午 3:13
 */
namespace app\admin\model;
use think\Model;

class MemberModel extends Model
{
    // 确定链接表名
    protected $name = 'member';
    //查询会员列表
    public function getMemberByWhere($where, $offset, $limit)
    {
        return $this->where($where)->limit($offset, $limit)->order('member_id desc')->select();
    }
    //查询会员总数量
    public function getMemberCount($where)
    {
        return $this->where($where)->count();

    }
    //修改会员信息
    public function getMemberUpdate($map,$data){
        return $this->where($map)->update($data);
    }
    //查询会员详情
    public function getMemberInfo($mid)
    {
        $map['member_id'] = $mid;
        return $this->where($map)->find();
    }
}